//
//  HLHomeListMatchCell.m
//  YueYue
//
//  Created by hulu001 on 2023/5/25.
//

#import "HLHomeListMatchCell.h"

@interface HLHomeListMatchCell ()

@property (nonatomic, strong) UIImageView *iconView;
@property (nonatomic, strong) UILabel *titleLabel;

@end

@implementation HLHomeListMatchCell


-(instancetype)initWithFrame:(CGRect)frame{
    
    if ([super initWithFrame:frame]) {
        self.backgroundColor= UIColorWhite;
        [self setupView];
    }
    return self;
    
}

- (void)setupView {
    self.iconView = [[UIImageView alloc] init];
    _iconView.userInteractionEnabled = NO;
    _iconView.layer.masksToBounds = YES;
    _iconView.layer.cornerRadius = 4;
    _iconView.contentMode = UIViewContentModeScaleAspectFill;
    [self.contentView addSubview:_iconView];
    [_iconView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.edges.mas_equalTo(0);
    }];
    
    
    self.titleLabel = [[UILabel alloc] qmui_initWithFont:UIFontBoldMake(14) textColor:UIColorWhite];
    [self.contentView addSubview:_titleLabel];
    [_titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.top.mas_equalTo(8);
    }];
}

- (void)setModel:(HLHomeListMatchModel *)model
{
    _model = model;
    _iconView.image = UIImageMake(model.icon);
    _titleLabel.text = model.title;
}


@end
